import { findAllTower } from '@/apis/towerApi'
import { defineStore } from 'pinia'
import { ref } from 'vue'

export default defineStore('tower', () => {
  const towers = ref<TowerModel[]>([])

  async function all(args: Record<string, any>) {
    const { data } = await findAllTower(args)
    towers.value = data
  }

  return { towers, all }
})
